package com.iknow.xmpp.util;

import android.os.Parcel;
import android.os.Parcelable;
import org.jivesoftware.smack.packet.Presence;

public class PresenceAdapter
  implements Parcelable
{
  private String mFrom;
  private int mStatus;
  private String mStatusText;
  private String mTo;
  private int mType;

  public PresenceAdapter(Parcel paramParcel)
  {
    this.mType = paramParcel.readInt();
    this.mStatus = paramParcel.readInt();
    this.mTo = paramParcel.readString();
    this.mFrom = paramParcel.readString();
    this.mStatusText = paramParcel.readString();
  }

  public PresenceAdapter(Presence paramPresence)
  {
    this.mType = PresenceType.getPresenceType(paramPresence);
    this.mStatus = Status.getStatusFromPresence(paramPresence);
    this.mTo = paramPresence.getTo();
    this.mFrom = paramPresence.getFrom();
    this.mStatusText = paramPresence.getStatus();
  }

  public int describeContents()
  {
    return 0;
  }

  public String getFrom()
  {
    return this.mFrom;
  }

  public int getStatus()
  {
    return this.mStatus;
  }

  public String getStatusText()
  {
    return this.mStatusText;
  }

  public String getTo()
  {
    return this.mTo;
  }

  public int getType()
  {
    return this.mType;
  }

  public void setFrom(String paramString)
  {
    this.mFrom = paramString;
  }

  public void setStatus(int paramInt)
  {
    this.mStatus = paramInt;
  }

  public void setStatusText(String paramString)
  {
    this.mStatusText = paramString;
  }

  public void setTo(String paramString)
  {
    this.mTo = paramString;
  }

  public void setType(int paramInt)
  {
    this.mType = paramInt;
  }

  public void writeToParcel(Parcel paramParcel, int paramInt)
  {
    paramParcel.writeInt(this.mType);
    paramParcel.writeInt(this.mStatus);
    paramParcel.writeString(this.mTo);
    paramParcel.writeString(this.mFrom);
    paramParcel.writeString(this.mStatusText);
  }
}